import { Window_Base } from "@/windows/Window_Base.js";

export class Window_Help extends Window_Base {
    constructor(width,height) {
        super(width,height);
        this._text = '';
    }

    setText(text) {
        if (this._text != text) {
            this._text = text;
            this.refresh();
        }
    }

    clear() {
        this.setText('');
    }

    setItem(item) {
        this.setText(item?.description??'');
    }

    refresh() {
        this.contents.clear();
        this.drawTextEx(this._text, 0, 0);
    }
}